package com.yulan.fastkillcourse.Dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 课程传输包装类
 */
@Data
@AllArgsConstructor
@Builder
@ToString
public class CourseDto {
    @NotNull(message = "课程id不能为空！！")
    private Integer cid;
    @NotBlank(message = "课程名称不能为空！！")
    private String name;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;


    private Integer margin;
    @NotBlank(message = "课程教师名称不能为空不能为空！！")
    private String teacherName;
    private Integer kind;
    private Integer hot;
    private Integer score;
    private Integer timeInterval;
//    @Builder.Default
//    private String introduction = "该课程展示没有介绍";

}
